# $Id: PKGBUILD 177540 2013-02-07 05:32:28Z eric $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=facile
pkgver=1.1
pkgrel=15
pkgdesc="A Functional Constraint Library"
arch=(i686 x86_64)
url="http://www.recherche.enac.fr/opti/facile/"
license=("LGPL")
makedepends=('ocaml')
depends=()
source=(http://www.recherche.enac.fr/opti/facile/distrib/$pkgname-$pkgver.tar.gz
        ocaml-facile-ocaml-4.patch)
md5sums=('ab673e1fc0859a42bcb639a02c2d7e9e'
         '1ffc2f08c9f1db8ef0d444ec06f82b79')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  # fix ocaml4
  patch -Np1 -i ../ocaml-facile-ocaml-4.patch
  ./configure
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver/src"
  install -d "$pkgdir/usr/lib/ocaml/facile"
  install -D -m 644 facile.cmxa facile.cmi facile.cma facile.a "$pkgdir/usr/lib/ocaml/facile"
}
